<template>
  <div>
    <orhon-profile :LeftBrief="LeftBrief" />
    <Dynamic :Card="itemCard" :loading="loading" />
    <!-- <ul>
          <NuxtLink :to="val.to" v-for="(val,index) in list" :key="index">{{val.title}}</NuxtLink>
    </ul>-->
  </div>
</template>
<script lang='ts'>
import OrhonProfile from "../components/HomePage/InProfile.vue";
import Dynamic from "../components/Dynamic.vue";
import { getMenu } from "../logicLib/menu";
import { Component, Vue, Prop } from "vue-property-decorator";

@Component({
  layout: "default",
  components: {
    OrhonProfile,
    Dynamic
  },
  asyncData({ app }) {
    return getMenu(app, "123").then((res: any) => {
      if (res.status === 0) {
        console.log(res.data, "获取数据");
        return {
          loading: false,
          itemCard: res.data
        };
      }
    });
  }
})
export default class HomePage extends Vue {
  AvatarImage: string =
    "http://pic37.nipic.com/20140113/8800276_184927469000_2.png";

  LeftBrief: Object = {
    theTeacher: "admin", //老师
    lastTime: "2018-08-08", //最近登录时间
    continuousDay: 40, //连续登录天数
    numberOfTime: 30 //总登录次数
  };
  Columnar: string = "Columnar";
  loading: boolean = true;
  comp: Array<string> = ["Pie"];
  itemCard: Array<any> = [];
  prop = {
    name: "张三"
  };

  head() {
    return {
      title: "我的课程",
      meta: {
        hid: "description",
        name: "description",
        content: "My custom"
      }
    };
  }

  onShowSizeChange() {}
}
</script>
<style lang="less">
.ant-more {
  display: block;
  margin-bottom:10px;
}
</style>
